package com.ftp.web.spider.controller;

import lombok.extern.slf4j.Slf4j;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.bind.annotation.*;
import java.util.Map;


@Slf4j
@RestController
@RequestMapping(value = "/media")
public class ImgGetController {

    private Logger logger=LoggerFactory.getLogger(ImgGetController.class);


    @RequestMapping(method = RequestMethod.GET,value = "/test")
    @ResponseBody
    public String testClient(){
        System.out.println("链接成功");
        logger.info("----{}-----","参数");
        return "Success";
    }

    @RequestMapping(method = RequestMethod.POST,value = "/ptest")
    @ResponseBody
    public String testPostClient(@RequestBody Map map){
        System.out.println("链接成功");
        System.out.println(map.get("name"));
        logger.info("----{}-----",map);
        return "Success"+map;
    }

}

